package com.fluxtool.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fluxtool.entity.Ips;
import com.fluxtool.mapper.IpsMapper;
import com.fluxtool.service.IpsService;

@Service
public class IpsServiceImpl extends ServiceImpl<IpsMapper, Ips> implements IpsService{

	@Autowired(required = false)
	private IpsMapper ipsMapper;
	
	@Override
	public List<Ips> selectAllWhereEnble() {
		QueryWrapper<Ips> queryWrapper = new QueryWrapper<Ips>();
		queryWrapper.eq("id",0);
		return ipsMapper.selectList(queryWrapper);
	}

	@Override
	public boolean deleteALL() {
		QueryWrapper<Ips> queryWrapper = new QueryWrapper<Ips>();
		queryWrapper.ne("id",0);
		ipsMapper.delete(queryWrapper);
		return false;
	}

}
